package com.power.flowable.api;

import com.plf.common.domain.ResponseDTO;
import com.power.flowable.model.Act_dsn_form_layout;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@FeignClient(value = "sfflow-svr", contextId = "sfflow-svr", path = "/sfflow-svr")
@RestController
public interface IAct_dsn_form_layoutFeign {

    /**
     * 根据表单定义id, 查询首个环节的表单布局
     */
    @PostMapping("/act_dsn_form_layout/viewFirstLayout")
    ResponseDTO viewFirstLayout(@RequestParam String formid);

    /**
     * 根据表单环节id查看流程表单布局设计
     */
    @PostMapping("/act_dsn_form_layout/viewByStepId")
    ResponseDTO viewByStepId(@RequestParam String formid, @RequestParam String stepid);

    /**
     * 根据流程环节id查看流程表单布局设计
     */
    @PostMapping("/act_dsn_form_layout/viewByProcessStepId")
    ResponseDTO viewByProcessStepId(@RequestParam String formid, @RequestParam String stepid);

    /**
     * 根据表单定义id查看流程表单布局设计
     */
    @PostMapping("/act_dsn_form_layout/listByFormid")
    ResponseDTO listByFormid(@RequestParam String formid);

    /**
     * 查看流程表单布局设计
     */
    @PostMapping("/act_dsn_form_layout/id")
    ResponseDTO view(@RequestParam String id);

    /**
     * 修改或保存流程表单布局设计
     */
    @PostMapping("/act_dsn_form_layout/save")
    ResponseDTO save(@RequestBody Act_dsn_form_layout  act_dsn_form_layout);

    /**
     * 存草稿或完成
     */
    @PostMapping("/act_dsn_form_layout/saveDraftOrAll")
    ResponseDTO saveDraftOrAll(@RequestBody Act_dsn_form_layout  act_dsn_form_layout,@RequestParam(defaultValue = "true") boolean isDraft);


}
